package net.alche.al.util.far.pojo;

import java.util.List;

import javax.swing.Renderer;

import net.alche.fa.core.model.FaValue;

//
// 数据分页对象
//
// @decsript
// @author yaoliwu
// @date 2018/9/16 13:35
// @version 1.0
//
@SuppressWarnings("rawtypes")
public class PageList {
  private int size;
  private long total;
  private int num;
  private List list;
  transient private FaValue favList;
  transient private String orderBy;
  transient private String orderType;
  transient private int limitStart;
  // transient Page pageHelper;

  public PageList() {
    size = 10;
    total = 0;
    num = 0;
  }

  public void setFavList(FaValue fav) {
    favList = fav;
  }

  public FaValue getFavList() {
    return favList;
  }

  public List getList() {
    if (favList != null) {
      return (List) favList.getValue();
    }
    return list;
  }

  public void setList(List list) {
    this.list = list;
  }

  public int getSize() {
    return size;
  }

  public int getNum() {
    return num;
  }

  public void setNum(int num) {
    this.num = num;
  }

  public long getTotal() {
    // if ( this.pageHelper != null) {
    // return this.pageHelper.getTotal();
    // }
    return total;
  }

  public void setTotal(long total) {
    this.total = total;
  }

  public void setSize(int size) {
    this.size = size;
  }

  // public void setPageHelper(Page pageHelper) {
  // this.pageHelper = pageHelper;
  // }

  public String getOrderBy() {
    return orderBy;
  }

  public void setOrderBy(String orderBy) {
    this.orderBy = orderBy;
  }

  public String getOrderType() {
    return orderType;
  }

  public void setOrderType(String orderType) {
    this.orderType = orderType;
  }

  public int getLimitStart() {
    return limitStart;
  }

  public void setLimitStart(int limitStart) {
    this.limitStart = limitStart;
  }
}